﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>MERCHANT CENTER</title>
		<%@ include file="/share/include.jsp" %>
		<!-- <script src="js/jquery.min.js"></script> -->
   		 <meta name="viewport" content="width=device-width, initial-scale=1">
		 <script type="application/x-javascript"> 
			addEventListener("load", function() { 
				setTimeout(hideURLbar, 0); 
			}, false); 
			function hideURLbar(){ 
				window.scrollTo(0,1); 
			} 
		</script>
		<script type="text/javascript">
			//卖家删除订单
			function deletedOrder(id){
				art.dialog({
					width: 250,
					height: 100,
					fixed: true,
				    padding: 0,
				    title: "提示",
				    content: "是否确认删除订单<font style='color:red'>"+id+"</font>？",
				    lock: true,
				    button: [{
					    name: "确定",
					    callback: function () {
					    	$.ajax({
								 url: "${root}/control/order/orderItemController/shopDeletedOrder.do?orderId="+id,
								 data: {
								 	
								 },
								 type: "post",
								 success: function(data){
						        	if(data=="true"){
						        		var url = '${root }/control/order/orderItemController/shopOrderCompleteList.do?orderShopId=${suSession.shopId}';
						        		artDalog("提示","删除订单 "+id+" 成功",url);
						        	}else{
						        		artDalog("错误信息","订单 "+id+" 不存在，无法删除！",null);
						        	}
						      	}
						   	});
					    },
				        focus: true
				     },
				     {
				        name: "取消"
				     }]
				});
			}
		</script>
	</head>
	<body>
		<!-- container -->
		<!-- header -->
		<div class="header">
			<%@ include file="/control/jsp/layout/header.jsp" %>
			<!-- /bottom-header -->
		</div>
		<!-- header -->
		<!--- top-nav -->
			<%@ include file="/control/jsp/layout/sellerMenu.jsp" %>
		<!--- top-nav -->
		<!-- Product-Details-page -->
		<div class="details-page">
			<div class="content details-page">
				<div class="product-details">
					<div class="container">
						<div class="details-left" style="width: 100%;">
						    <h4 style="color:red;"><img style="padding: 10px;" src="${root}/images/bx.gif" />已完成订单</h4>
							<table class="list_order" border="0" align="center" cellpadding="0" cellspacing="2">
							  <thead>
								<tr style="height:40px;">
								  <th>订单号</th>
								  <th>案例</th>
								  <th>用户姓名</th>
								  <!-- <th>性别</th> -->
								  <th>联系电话</th>
								 <!--  <th>地址</th>
								  <th>留言</th> -->
								  <th>状态</th>
								  <th>操作</th>
								  <th>详情</th>
								</tr>
							  </thead>
							  <tbody style="text-align: center;">
							      <c:if test="${not empty pageView.records }">
							     	<c:forEach items="${pageView.records }" var="order">
							  	            <tr style="height: 20px;"></tr>
											<tr style="height: 80px;">
											  <td><a href="${root }/control/order/orderItemController/displayOrderDetail.do?orderId=${order.orderId }&orderShopId=${order.orderShopId }">${fn:escapeXml(order.orderId) }</a></td>
											  <td>
											  	<c:if test="${not empty order.orderCaseId}">
											  		<img width="80" src="${imageService}${order.orderCasePicPath}" />
											  	</c:if>
											  	<c:if test="${empty order.orderCaseId}">
											  		
											  	</c:if>
											  </td>
											  <td>${fn:escapeXml(order.orderName) }</td>	
											  <%-- <td>
											  	<c:if test="${order.orderSex == 1 }">男</c:if>
											  	<c:if test="${order.orderSex == 2 }">女</c:if>
											  </td> --%>							  
											  <td>${fn:escapeXml(order.orderPhone) }</td>
											  <%-- <td>${fn:escapeXml(order.orderAddress) }</td>
											  <td>${fn:escapeXml(order.orderContent) }</td> --%>
											  <%-- <td><fmt:formatDate value="${order.orderCreateTime}" pattern="yyyy-MM-dd"/></td>
											  <td><fmt:formatDate value="${order.orderTime}" pattern="yyyy-MM-dd"/></td> --%>
											  <td>
											  	<c:if test="${order.orderMoneyStatus == 5 }">已完成</c:if>
											  	<c:if test="${order.orderMoneyStatus == 6 }">已评价</c:if>
											  	<c:if test="${order.orderMoneyStatus == 7 }">已退款</c:if>
											  </td>
											  <td><a href="javascript:deletedOrder('${order.orderId }');">删除</a></td>
											  <td><a href="${root }/control/order/orderItemController/displayOrderDetail.do?orderId=${order.orderId }&orderShopId=${order.orderShopId }">详情</a></td>
											</tr>
							         	</c:forEach>
						        	</c:if>
							    </tbody>
							   </table>
						</div>
						<div class="clearfix"> </div>
					</div>
					<br>
					<!--page-->
					 <%@ include file="/share/pageTwo.jsp" %>
					<!--end page-->
			    </div>
		    </div>
		</div>
		<!-- /Product-Details-page -->
		<!-- footer -->
		<%@ include file="/control/jsp/layout/footer.jsp" %>
</body>
</html>

